<template>

	<ListLayout :customStyle="{
		paddingLeft:0,
		paddingRight:0
	}">
		<!-- <cellItem label="巡检人员" v-model="queryParams.user" itemClickType="select-user"></cellItem> -->
		<cellItem label="资产类型" v-model="queryParams.assetType" itemClickType="select-asset"></cellItem>
		<cellItem label="巡检单元" v-model="queryParams.unit" itemClickType="select-inspectionUnit"></cellItem>
		<cellItem label="使用科室" v-model="queryParams.handleDept" itemClickType="select-department"></cellItem>
		<cellItem label="运维科室" v-model="queryParams.OperationDept" itemClickType="select-department"></cellItem>
		<cellItem label="巡检结果" v-model="queryParams.result" :customActionSheetList="result"></cellItem>
		<cellItem label="开始时间" v-model="queryParams.startTime" itemClickType="date-picker-ymd-before"></cellItem>
		<cellItem label="结束时间" v-model="queryParams.endTime" itemClickType="date-picker-ymd-before"></cellItem>




		<template #footer>
			<BttonGroup @leftClick="clear" @rightClick="submit"></BttonGroup>
		</template>


	</ListLayout>


</template>

<script>
	import ListLayout from '@/components/layout/listLayout.vue'
	import BttonGroup from '@/components/buttonGroup/groupTwo.vue'
	import PagesPollingRouterConfig from '@/pagesPolling/routerConfig.js'
	export default {
		components: {
			BttonGroup,
			ListLayout
		},
		data() {
			return {
				result: [
					{ name: '正常', value: 1 },
					{ name: '异常', value: 2 }
				],
				queryParams: {
					user: '',
					assetType: '',
					unit: '',
					handleDept: '',
					OperationDept: '',
					result: '',
					startTime: '',
					endTime: ''
				}

			}
		},
		onLoad(params) {

		},

		methods: {
			initRouteData(data) {

				let obj = JSON.parse(data)

			},

			submit() {
				let queryParams = JSON.stringify(this.queryParams)
				wx.redirectTo({
					url: `${PagesPollingRouterConfig.Search}?query=${queryParams}`
				})

			},
			clear() {
				this.queryParams = {
					user: '',
					assetType: '',
					unit: '',
					handleDept: '',
					OperationDept: '',
					result: '',
					startTime: '',
					endTime: ''
				}
			},


		}
	}
</script>
<style lang="scss" scoped>

</style>
